package com.neuedu.boot.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 医生-用户信息
 * </p>
 *
 * @author 金山老师
 * @since 2024-04-01
 */
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 医生id
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 真实姓名
     */
    private String realname;

    /**
     * 电话号码
     */
    private String telephone;

    /**
     * id
     */
    private Integer deptId;

    /**
     * 医生类型
     */
    private Integer userType;

    /**
     * 医生级别
     */
    private Integer registLevel;

    /**
     * 最后登录时间
     */
    private LocalDateTime lastlogin;

    /**
     * 是否有效，1 有效，0 失效
     */
    // @TableLogic  默认的 有效状态是 0 ，删除是 1
    @TableLogic(value = "1", delval = "0")
    // @TableLogic(value ="100", delval = "200")

    private Integer active;
    @Version
    private Integer version;


    // @TableField(fill = FieldFill.INSERT)
    // private String createBy;
    // @TableField(fill = FieldFill.INSERT)
    // private LocalDateTime createTime;

    /**
     * 创建时间
     */
    private LocalDateTime createtime;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getRegistLevel() {
        return registLevel;
    }

    public void setRegistLevel(Integer registLevel) {
        this.registLevel = registLevel;
    }

    public LocalDateTime getLastlogin() {
        return lastlogin;
    }

    public void setLastlogin(LocalDateTime lastlogin) {
        this.lastlogin = lastlogin;
    }

    public Integer getActive() {
        return active;
    }

    public void setActive(Integer active) {
        this.active = active;
    }

    public LocalDateTime getCreatetime() {
        return createtime;
    }

    public void setCreatetime(LocalDateTime createtime) {
        this.createtime = createtime;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", realname='" + realname + '\'' +
                ", telephone='" + telephone + '\'' +
                ", deptId=" + deptId +
                ", userType=" + userType +
                ", registLevel=" + registLevel +
                ", lastlogin=" + lastlogin +
                ", active=" + active +
                ", version=" + version +
                ", createtime=" + createtime +
                '}';
    }
}
